package com.maker.ai.mapper;

import com.maker.ai.entity.Rag;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface RagMapper {

    //添加预约信息的方法
    @Insert("insert into rag(uuid,name,path,upload_time) values(#{uuid},#{name},#{path},#{uploadTime})")
    void insert(Rag rag);
    //根据文件ID，查询查询信息的方法
    @Select("select * from rag where id=#{id}")
    Rag findById(String id);
    @Select("select * from rag")
    List<Rag> getAllRags();
    @Delete("delete from rag where id=#{id}")
    void deleteById(String id);
    @Update("update rag set uuid=#{uuid},name=#{name},path=#{path},upload_time=#{uploadTime} where id=#{id}")
    void update(Rag rag);
}
